{% extends 'crm/base/base.html' %}
{% load filter_sex %}
{% block title %}
    学生首页展示
{% endblock %}

{% block section %}
    {{ section }}
{% endblock %}

{% block content %}

<form class="form-inline">
  <div class="form-group">
    <div class="input-group">
      <input type="text" class="form-control" id="exampleInputAmount" placeholder="请输入你要查询的数据" name="search" value="{% if search %}{{ search }}{% endif %}">
    </div>
  </div>
  <button type="submit" class="btn btn-success">搜索</button>
  <button type="reset" class="btn btn-primary">重置</button>
  <a href="{% url 'crm:s_add' %}" class="btn btn-info">添加</a>
</form>
              <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>序号</th>
                  <th>姓名</th>
                  <th>性别</th>
                  <th>QQ</th>
                  <th>电话</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
              {% for s in sts %}
                <tr>
                  <td><a href="{% url 'crm:student'  s.id %}">{{ s.id }}</a></td>
                  <td>{{ s.name }}</td>
                  <td>{{ s.sex|smale }}</td>
                  <td>{{ s.qq }}</td>
                  <td>{{ s.phone }}</td>
                  <td>
                      <a href="{% url 'crm:s_edit'  s.id %}"class="btn btn-primary btn-sm">编辑</a>
                      <a href="{% url 'crm:s_del'  s.id %}"class="btn btn-danger btn-sm">删除</a>
                  </td>
                </tr>
              {% endfor %}

              </tbody>
            </table>
          </div>
{% endblock %}
